package sg.nus.iss.vmcs.guilisteners;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import sg.nus.iss.vmcs.controllers.MainController;

/**
 * Action Listener for the Begin Simulation Button on the Simulator Control Panel
 * @author Pang Pingli
 */
public class EndSimulationButtonListener implements ActionListener {

	/** MainController for the Simulation */
	private MainController mctrl;

	/**
	 * Creates a new instance of the End Simulation Button Listener
	 * @param mc Reference to MainController
	 */
	public EndSimulationButtonListener(MainController mc) {
		mctrl = mc;
	}
	
	/**
	 * Implementation of Action Performed
	 */
	public void actionPerformed(ActionEvent e) {
		mctrl.closeDown();
	}
}